<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>RetroSnake: SnakerCamera Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">RetroSnake
   &#160;<span id="projectnumber">0.7.23</span>
   </div>
   <div id="projectbrief">Try to write a snake.io in cmd.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('class_snaker_camera.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="class_snaker_camera-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">SnakerCamera Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>虚拟相机  
 <a href="class_snaker_camera.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_snaker_player_8h_source.html">SnakerPlayer.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ad7840c2468441ca88098150421d2ccf8"><td class="memItemLeft" align="right" valign="top"><a id="ad7840c2468441ca88098150421d2ccf8"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_snaker_camera.html#ad7840c2468441ca88098150421d2ccf8">SnakerCamera</a> (int x, int y)</td></tr>
<tr class="memdesc:ad7840c2468441ca88098150421d2ccf8"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造函数 <br /></td></tr>
<tr class="separator:ad7840c2468441ca88098150421d2ccf8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d5d03a81aa55ee69a8cb30f21251fed"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_snaker_camera.html#a2d5d03a81aa55ee69a8cb30f21251fed">Render2String</a> (<a class="el" href="class_snaker_map.html">SnakerMap</a> *map)</td></tr>
<tr class="memdesc:a2d5d03a81aa55ee69a8cb30f21251fed"><td class="mdescLeft">&#160;</td><td class="mdescRight">将相机画面渲染成字符串  <a href="class_snaker_camera.html#a2d5d03a81aa55ee69a8cb30f21251fed">More...</a><br /></td></tr>
<tr class="separator:a2d5d03a81aa55ee69a8cb30f21251fed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a7a97fad313560af47d7deb2ec08b47"><td class="memItemLeft" align="right" valign="top"><a id="a4a7a97fad313560af47d7deb2ec08b47"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_snaker_camera.html#a4a7a97fad313560af47d7deb2ec08b47">Resize</a> (int x, int y)</td></tr>
<tr class="memdesc:a4a7a97fad313560af47d7deb2ec08b47"><td class="mdescLeft">&#160;</td><td class="mdescRight">相机边框重新定义大小 <br /></td></tr>
<tr class="separator:a4a7a97fad313560af47d7deb2ec08b47"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3bb652f80a6d16e89263c45612c81231"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_snaker_camera.html#a3bb652f80a6d16e89263c45612c81231">Move</a> (int direct, int speed)</td></tr>
<tr class="memdesc:a3bb652f80a6d16e89263c45612c81231"><td class="mdescLeft">&#160;</td><td class="mdescRight">在当前位置步进相机  <a href="class_snaker_camera.html#a3bb652f80a6d16e89263c45612c81231">More...</a><br /></td></tr>
<tr class="separator:a3bb652f80a6d16e89263c45612c81231"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94a68f7dc9c78d788f2787033b2bed4d"><td class="memItemLeft" align="right" valign="top"><a id="a94a68f7dc9c78d788f2787033b2bed4d"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_snaker_camera.html#a94a68f7dc9c78d788f2787033b2bed4d">Move</a> (pair&lt; int, int &gt;)</td></tr>
<tr class="memdesc:a94a68f7dc9c78d788f2787033b2bed4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">将相机瞬移到指定位置 <br /></td></tr>
<tr class="separator:a94a68f7dc9c78d788f2787033b2bed4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a19458d726c5236f5a172371d71b4ea9d"><td class="memItemLeft" align="right" valign="top"><a id="a19458d726c5236f5a172371d71b4ea9d"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_snaker_camera.html#a19458d726c5236f5a172371d71b4ea9d">size</a> [2]</td></tr>
<tr class="memdesc:a19458d726c5236f5a172371d71b4ea9d"><td class="mdescLeft">&#160;</td><td class="mdescRight">相机大小 <br /></td></tr>
<tr class="separator:a19458d726c5236f5a172371d71b4ea9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae9a38754b9d24926c0ce688c826bc76"><td class="memItemLeft" align="right" valign="top"><a id="aae9a38754b9d24926c0ce688c826bc76"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_snaker_camera.html#aae9a38754b9d24926c0ce688c826bc76">position</a> [2]</td></tr>
<tr class="memdesc:aae9a38754b9d24926c0ce688c826bc76"><td class="mdescLeft">&#160;</td><td class="mdescRight">相机绝对坐标 <br /></td></tr>
<tr class="separator:aae9a38754b9d24926c0ce688c826bc76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad1c989d7d8f9ea2d5895a2129103066c"><td class="memItemLeft" align="right" valign="top"><a id="ad1c989d7d8f9ea2d5895a2129103066c"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>x</b></td></tr>
<tr class="separator:ad1c989d7d8f9ea2d5895a2129103066c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d0ada173078767da939e15aa5eae146"><td class="memItemLeft" align="right" valign="top"><a id="a8d0ada173078767da939e15aa5eae146"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>y</b></td></tr>
<tr class="separator:a8d0ada173078767da939e15aa5eae146"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>虚拟相机 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">size</td><td>相机大小 </td></tr>
    <tr><td class="paramname">position</td><td>相机绝对坐标 </td></tr>
  </table>
  </dd>
</dl>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a3bb652f80a6d16e89263c45612c81231"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3bb652f80a6d16e89263c45612c81231">&#9670;&nbsp;</a></span>Move()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SnakerCamera::Move </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>direct</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>speed</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>在当前位置步进相机 </p>
<p>接受的第二个参数为步进步数，注意x轴向下 </p>

</div>
</div>
<a id="a2d5d03a81aa55ee69a8cb30f21251fed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2d5d03a81aa55ee69a8cb30f21251fed">&#9670;&nbsp;</a></span>Render2String()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">string SnakerCamera::Render2String </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_snaker_map.html">SnakerMap</a> *&#160;</td>
          <td class="paramname"><em>map</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>将相机画面渲染成字符串 </p>
<p>每行画面用回车分隔开 在渲染前会将视野内的所有区块执行扩展生成操作，确保视野内一定会有区块， 避免内存错误 </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/include/<a class="el" href="_snaker_player_8h_source.html">SnakerPlayer.h</a></li>
<li>src/SnakerPlayer/SnakerPlayer.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_snaker_camera.html">SnakerCamera</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
